Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(governance): add vxASTRO and emissions controller contracts #110

Merged
merged 35 commits into from
Aug 21, 2024

Conversation

epanchee
Copy link
Collaborator

@epanchee epanchee commented Aug 20, 2024

This PR aims to bring vxASTRO voting escrow contract across all Astroport deployments and allow ASTRO holders to decide on where should ASTRO emissions be directed.

Added:

  1. vxASTRO chain agnostic contract. Idea was to keep it as simple as possible with basic endpoints like lock, unlock, relock and withdraw. It escrows xASTRO tokens with 14 days lockup, allows to cast emissions and governance votes from any Astroport deployment. Balance changes are instantly reflected in emissions voting. Unlocking instantly wipes out user's contribution in voting, locking increases contribution based on previously selected voting power distribution. Relock recovers user's contribution.
  2. Emissions controller (Hub) - is the main site where emissions voting happens. Pools must be whitelisted first to be eligible for voting. Contract's endpoint "tune_pools" should be executed every 14 days on Monday 00:00 UTC. Although there is no strict requirement to do so at this time, it is preferable. Total emissions are based on Dynamic Emissions curve which is based on previous two epochs performance.
  3. Emissions controller (Outpost) - is a lightweight satellite of Hub' controller contract. It is meant to process user's emissions and governance votes from outpost and communicate with the Hub over secure IBC channel.

Updated

  1. Assembly contract now takes into account user's vxASTRO voting power in governance voting. Outpost users also can cast their votes through Outpost's Emissions controller. Note that as there is no technical way to track IBC token balances on outposts, users can't use their xASTRO as voting power from outposts.

epanchee added 5 commits July 29, 2024 14:43
feat(governance): add vxASTRO and emissions controller contracts
# Conflicts:
#	.github/workflows/check_artifacts.yml
#	Cargo.lock
#	contracts/assembly/Cargo.toml
#	contracts/builder_unlock/Cargo.toml
#	contracts/escrow_fee_distributor/Cargo.toml
#	contracts/generator_controller/Cargo.toml
#	contracts/generator_controller_lite/Cargo.toml
#	contracts/hub/Cargo.toml
#	contracts/outpost/Cargo.toml
#	contracts/voting_escrow/Cargo.toml
#	contracts/voting_escrow_lite/Cargo.toml
#	packages/astroport-governance/Cargo.toml
#	packages/astroport-governance/src/lib.rs
#	packages/astroport-tests-lite/Cargo.toml
#	packages/astroport-tests/Cargo.toml
@epanchee epanchee merged commit 78db9b8 into main Aug 21, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants